<?php

namespace Api\Model;

use Think\Model;

class UserinfoModel extends Model {

    function addUserinfo($user_id) {
        $aname = $lname . $fname;
        $data = array(
            'user_id' => $user_id,
            'createtime' => time()
        );
        return $this->add($data);
    }

    function upUserinfo($user_id, $updata) {
        $where = array(
            'user_id' => $user_id
        );
        $this->where('user_id = ' . $user_id)->save($updata);
    }

    function getUinfobyuid($user_id) {
        $where = array(
            'user_id' => $user_id
        );
        return $this->where($where)->find();
    }

}
